package org.jeecg.modules.goodsorder.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.feedback.entity.Feedback;
import org.jeecg.modules.goodsorder.entity.GoodsOrderDetail;
import org.jeecg.modules.goodsorder.entity.GoodsOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.recharge.entity.Balance;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 商品订单
 * @Author: jeecg-boot
 * @Date:   2024-07-11
 * @Version: V1.0
 */
public interface IGoodsOrderService extends IService<GoodsOrder> {

	/**
	 * 添加一对多
	 *
	 * @param goodsOrder
	 * @param goodsOrderDetailList
	 */
	public void saveMain(GoodsOrder goodsOrder,List<GoodsOrderDetail> goodsOrderDetailList) ;
	
	/**
	 * 修改一对多
	 *
   * @param goodsOrder
   * @param goodsOrderDetailList
	 */
	public void updateMain(GoodsOrder goodsOrder,List<GoodsOrderDetail> goodsOrderDetailList);
	
	/**
	 * 删除一对多
	 *
	 * @param id
	 */
	public void delMain (String id);
	
	/**
	 * 批量删除一对多
	 *
	 * @param idList
	 */
	public void delBatchMain (Collection<? extends Serializable> idList);

	void doOrder(LoginUser sysUser, GoodsOrder order, List<GoodsOrderDetail> detailList);

	void payOrder(LoginUser sysUser, GoodsOrder order, Balance balance);

	void sendMsg4Goods(String orderId);

	IPage<GoodsOrder> pageList(Page<GoodsOrder> page, Wrapper<GoodsOrder> queryWrapper);
}
